///**
// * Copyright 北京彩通农旗资讯有限公司 All rights reserved.
// * 北京彩通农旗资讯有限公司 专有/保密源代码,未经许可禁止任何人通过任何* 渠道使用、修改源代码.
// */
//package cn.xspace.module.other.service;
//
//import org.json.JSONObject;
//
//import com.xspace.android.xafcommon.util.Constants;
//import com.xspace.android.xafcommon.util.LogUtil;
//import com.xspace.android.xafcommon.util.SharedPreferencesUtils;
//
//import android.content.ComponentName;
//import android.content.ServiceConnection;
//import android.os.IBinder;
//import cn.xspace.aidl.AppBaseInfoAidl;
//import cn.xspace.module.other.application.MyApplication;
//
//public class GetDataConnetion implements ServiceConnection {
//	AppBaseInfoAidl appBaseInfoAidl;
//	private INextOperation callback;
//
//	public interface INextOperation {
//		void operation();
//	}
//
//	public GetDataConnetion(INextOperation iNextOperation) {
//		callback = iNextOperation;
//	}
//
//	@Override
//	public void onServiceConnected(ComponentName name, IBinder service) {
////		MyApplication.get().isConnectMainSuccess = true;
//		appBaseInfoAidl = AppBaseInfoAidl.Stub.asInterface(service);
//		if (appBaseInfoAidl == null) {
//			return;
//		}
//		try {
//			System.out.println("接口返回的数据:" + appBaseInfoAidl.getBaseInfo());
//			JSONObject jsonData = new JSONObject(appBaseInfoAidl.getBaseInfo());
//			String packName = jsonData.optString("packgeName");
//			System.out.println("Tools.mainPackName:" + packName);
//			SharedPreferencesUtils.setPfValue(MyApplication.get(), Constants.PACKAGE_NAME_MAIN,
//					packName, String.class.getName());
//			SharedPreferencesUtils.setPfValue(MyApplication.get(), Constants.ACCOUNT_VALIDATED, "1", String.class.getName());
//			LogUtil.d("GetDataConnetion", "callback");
//			callback.operation();
//
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
//
//	@Override
//	public void onServiceDisconnected(ComponentName name) {
//	}
//
//
//}
